﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace TreeViewEx.Test.Model.Helper
{
	public class Const
	{
		public const int INPUT_MOUSE = 0;
		public const int INPUT_KEYBOARD = 1;
	}

	[StructLayout(LayoutKind.Sequential)]
	public struct INPUT
	{
		public int type;
		public INPUTUNION union;
	};

	[StructLayout(LayoutKind.Explicit)]
	public struct INPUTUNION
	{
		[FieldOffset(0)]
		public MOUSEINPUT mouseInput;
		[FieldOffset(0)]
		public KEYBDINPUT keyboardInput;
	};

	[StructLayout(LayoutKind.Sequential)]
	public struct MOUSEINPUT
	{
		public int dx;
		public int dy;
		public int mouseData;
		public int dwFlags;
		public int time;
		public IntPtr dwExtraInfo;
	};

	[StructLayout(LayoutKind.Sequential)]
	public struct KEYBDINPUT
	{
		public short wVk;
		public short wScan;
		public int dwFlags;
		public int time;
		public IntPtr dwExtraInfo;
	};
}
